package com.lixinlei.tech.common;

import org.apache.commons.compress.compressors.CompressorException;

import java.io.IOException;

/**
 * 编解码器
 *
 * @author yuwan
 */
public interface Codec {
    /**
     * 编码
     *
     * @param content
     * @return
     * @throws IOException
     * @throws CompressorException
     */
    byte[] encode(byte[] content);

    /**
     * 解码
     *
     * @param content
     * @return
     * @throws IOException
     * @throws CompressorException
     */
    byte[] decode(byte[] content);
}
